package rpc.bootstrap.conf;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import rpc.conf.RefererConfig;
import rpc.conf.RegistryConfig;
import rpc.conf.ServiceConfig;
import rpc.conf.WebConfig;

/*********
 *
 *
 *@author 197
 *@date 2020/6/18 20:39
 *
 **/


@ConfigurationProperties(prefix = "rpc", ignoreUnknownFields = true)
public class BootProperties {

  private static final Logger logger = LoggerFactory.getLogger(BootProperties.class);

  private boolean enabled = false;

  private ServiceConfig service;

  private List<ServiceConfig> services;


  private RefererConfig referer;

  private List<RefererConfig> referers;

  private RegistryConfig registry;
  private String dataDir;
  private WebConfig web;


  public RefererConfig getReferer() {
    return referer;
  }

  public void setReferer(RefererConfig referer) {
    this.referer = referer;
  }

  public List<RefererConfig> getReferers() {
    return referers;
  }

  public void setReferers(List<RefererConfig> referers) {
    this.referers = referers;
  }

  public boolean isEnabled() {
    return enabled;
  }

  public void setEnabled(boolean enabled) {
    this.enabled = enabled;
  }

  public ServiceConfig getService() {
    return service;
  }

  public void setService(ServiceConfig service) {
    this.service = service;
  }

  public List<ServiceConfig> getServices() {
    return services;
  }

  public void setServices(List<ServiceConfig> services) {
    this.services = services;
  }

  public WebConfig getWeb() {
    return web;
  }


  public BootProperties setWeb(WebConfig web) {
    this.web = web;
    return this;
  }

  public RegistryConfig getRegistry() {
    return registry;
  }

  public void setRegistry(RegistryConfig registry) {
    this.registry = registry;
  }

  public String getDataDir() {
    return dataDir;
  }

  public BootProperties setDataDir(String dataDir) {
    this.dataDir = dataDir;
    return this;
  }
}
